|
|
|
|
|
|
|
The command syntax for SQL-VB5 is very similar to standard ANSI SQL syntax. In fact, any valid SQL command is a valid SQL-VB5 command. However, there are a few additional commands in SQL-VB5 that you should know about. |
|
|
|
|
|
|
|
|
Three special command words work in SQL-VB5, but they are not SQL commands. These special commands are used to create, open, and close Microsoft Jet databases. SQL-VB5 also has a comment command. The comment command indicates to SQL-VB5 that the information on this line is for comment only and should not be executed. Finally, each command line must end with a semicolon (;). The semicolon tells SQL-VB5 where the command line ends. The special command words, their meanings, and examples are included in Table 13.1. |
|
|
|
|
| Table 13.1. Special SQL-VB5 commands. | | SQL-VB5 Command | Example | Description | | // | // this is a comment | Any line that begins with // is treated as a comment line and is not processed by the SQL-VB5 Interpreter. Comments cannot be placed at the end of SQL command lines, but must occupy their own line. Don't use the single quotation mark for comments as in Visual Basic because that character is a valid SQL character. Also, you must leave at least one space after the // for SQL-VB5 to recognize it as a comment marker. | | dbOpen | dbOpen C:\DATA.MDB; | The dbOpen command opens a Microsoft Jet database. SQL-VB5 can only open and process Microsoft Jet-format databases. A dbOpen command must be executed before any SQL statements are processed. | | dbMake | dbMake C:\NEWDATA.MDB; | The dbMake command creates a new, empty Microsoft Jet database on the drive path indicated in the command. When a database is created using the dbMake command, you do not have to issue a dbOpen command. |
|
|
|